<?php if ($totalRows_sesi_member>0) { ?><?php require_once('Connections/sepolwan_connect.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_ambil_berita = "SELECT * FROM artikel ORDER BY id DESC Limit 5";
$ambil_berita = mysql_query($query_ambil_berita, $sepolwan_connect) or die(mysql_error());
$row_ambil_berita = mysql_fetch_assoc($ambil_berita);
$totalRows_ambil_berita = mysql_num_rows($ambil_berita);

mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_home_beritanasional = "SELECT * FROM artikel WHERE jenis = 'Adobe-Photoshop' OR jenis = 'Adobe-Ilustrator' OR jenis = 'CorelDraw' ORDER BY id DESC Limit 4";
$home_beritanasional = mysql_query($query_home_beritanasional, $sepolwan_connect) or die(mysql_error());
$row_home_beritanasional = mysql_fetch_assoc($home_beritanasional);
$totalRows_home_beritanasional = mysql_num_rows($home_beritanasional);

mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_home_beritadpw = "SELECT * FROM artikel WHERE jenis = 'Tutorial-Web-Development' ORDER BY id DESC Limit 4";
$home_beritadpw = mysql_query($query_home_beritadpw, $sepolwan_connect) or die(mysql_error());
$row_home_beritadpw = mysql_fetch_assoc($home_beritadpw);
$totalRows_home_beritadpw = mysql_num_rows($home_beritadpw);

mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_home_beritadpc = "SELECT * FROM artikel WHERE jenis = 'Adobe-Flash' OR jenis = 'SwishMax' ORDER BY id DESC Limit 4";
$home_beritadpc = mysql_query($query_home_beritadpc, $sepolwan_connect) or die(mysql_error());
$row_home_beritadpc = mysql_fetch_assoc($home_beritadpc);
$totalRows_home_beritadpc = mysql_num_rows($home_beritadpc);
?>


<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="350" valign="top"><div style="height:10px"></div>
    <?php if ( $totalRows_sesi_member > 0 ) { ?>
<div id="halaman">
<div style="width:50px; height:50px; float:left; overflow:hidden; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; margin-right:10px; margin-bottom:10px"><a href="<?php echo $row_sesi_member['nama_user'] ?>" target="_parent"><img src="<?php if(file_exists("images/member/ava/resize_50_50_".md5($row_sesi_member['id']).".jpg")) { echo $base."images/member/ava/resize_50_50_".md5($row_sesi_member['id']).".jpg"; } else {  if(file_exists("images/member/ava/".md5($row_sesi_member['id']).".jpg")) { echo $base."images/member/ava/tester_50_50_".md5($row_sesi_member['id']).".jpg"; } else { echo $base."images/member/ava/resize_50_50_default.jpg"; } }  ?>" /></a> </div>
  <p><strong><a href="<?php echo $base.$row_sesi_member['nama_user'] ?>"><?php echo $row_sesi_member['full_name'] ?> </a></strong><br />

  <font size="-5" color="#999999"> (<?php echo $row_sesi_member['nama_user'] ?>)</font> </p>

   <div style="width:100%; height:1px; background:#CCC; margin-top:20px"></div>
      
    </div>
    <div style="padding:10px; background: #EFEFEF; border:1px solid #CCC;" align="center"><font size="-2" color="#999999"><a href="<?php echo $base.$row_sesi_member['nama_user'] ?>/following">Following(<?php mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_ceking = "SELECT * FROM ikut WHERE dari = $row_sesi_member[id] and ke = $row_sesi_member[id] ";
$ceking = mysql_query($query_ceking, $sepolwan_connect) or die(mysql_error());
$row_ceking = mysql_fetch_assoc($ceking);
$totalRows_ceking = mysql_num_rows($ceking);

if ($totalRows_ceking >0) { echo $totalRows_folowing-1; }  else { echo $totalRows_folowing; } 
mysql_free_result($ceking); ?>)</a> | <a href="<?php echo $base.$row_sesi_member['nama_user'] ?>/followers">Followers(<?php mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_ceking = "SELECT * FROM ikut WHERE dari = $row_sesi_member[id] and ke = $row_sesi_member[id] ";
$ceking = mysql_query($query_ceking, $sepolwan_connect) or die(mysql_error());
$row_ceking = mysql_fetch_assoc($ceking);
$totalRows_ceking = mysql_num_rows($ceking);

if ($totalRows_ceking >0) { echo $totalRows_folowers-1; }  else { echo $totalRows_folowers; } 
mysql_free_result($ceking); ?>)</a></font></div><div style="height:10px"></div><?php } ?>
<div id="halaman"><div class="jusul">New Member </div>
<?php 


mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_tl_user = "SELECT * FROM memberdb WHERE aktif = 'ya' and id <> '".$row_sesi_member['id']."' ORDER BY id DESC limit 6";
$tl_user = mysql_query($query_tl_user, $sepolwan_connect) or die(mysql_error());
$row_tl_user = mysql_fetch_assoc($tl_user);
$totalRows_tl_user = mysql_num_rows($tl_user);
do {
	mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_iring = "SELECT * FROM ikut WHERE dari = '".$row_sesi_member['id']."' AND ke = '".$row_tl_user['id']."'";
$iring = mysql_query($query_iring, $sepolwan_connect) or die(mysql_error());
$row_iring = mysql_fetch_assoc($iring);
$totalRows_iring = mysql_num_rows($iring);
?>
<div style="width:50px; height:50px; float:left; overflow:hidden; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; margin-right:10px; margin-bottom:10px"><a href="<?php echo $row_tl_user['nama_user'] ?>" target="_parent"><img src="<?php if(file_exists("images/member/ava/resize_50_50_".md5($row_tl_user['id']).".jpg")) { echo "images/member/ava/resize_50_50_".md5($row_tl_user['id']).".jpg"; } else { if(file_exists("images/member/ava/".md5($row_tl_user['id']).".jpg")) { echo $base."images/member/ava/tester_50_50_".md5($row_tl_user['id']).".jpg"; } else { echo $base."images/member/ava/resize_50_50_default.jpg"; } } ?>" /></a> </div>
  <strong><a href="<?php echo $base.$row_tl_user['nama_user'] ?>"><?php echo $row_tl_user['full_name'] ?> </a></strong>
  <?php if ($row_tl_user['id']<>$row_sesi_member['id'] and $totalRows_iring==0) { ?><form <?php if($row_sesi_member['id']<>''){ ?> action="<?php echo $base ?>" <?php } else {?>  action="<?php echo $base."login.php" ?>"  <?php } ?> method="post" name="okikut" >
<input name="ke" type="hidden" value="<?php echo $row_tl_user['id'] ?>" />
<input name="okikut" type="submit" value="Follow" /></form> <?php } else if ($row_tl_user['id']<>$row_sesi_member['id'] and $totalRows_iring>0) {  ?>
<form action="<?php echo $base ?>" method="post" name="delikut" >
<input name="ke" type="hidden" value="<?php echo $row_tl_user['id'] ?>" />
<input name="delikut" type="submit" value="Following" style="background: #036; color: #FFF" /></form>
<?php } ?>
   <div style="width:100%; height:1px; background:#CCC; margin-top:20px"></div><div style="height:10px"></div>

<?php mysql_free_result($iring); } while ($row_tl_user = mysql_fetch_array($tl_user)); mysql_free_result($tl_user);  ?>    </div>
 <div style="padding:10px; background: #EFEFEF; border:1px solid #CCC;" align="center"><font size="-2" color="#999999"><a href="<?php echo $base ?>halaman/people.html">Lihat Member lainya </a></font></div><div style="height:10px"></div>
<?php include "tambah/copy.php"; ?>
    </td>
    <td width="10"></td>
    <td width="590" valign="top" ><div style="height:10px"></div>
<div id="halaman"><div class="jusul">Timeline </div>
      
    </div>
    
      <div id="wrapper">
        <div id="pageData"></div>
        </div>
        
       </td>
  </tr>
</table><br />

<?php
mysql_free_result($home_beritanasional);
?>
<?php } ?>